1. Field
The disclosure relates generally to a computer implemented method, a data processing system, and a computer program product. More specifically, the disclosure relates to a computer implemented method, a data processing system, and a computer program product to dynamically scanning various Boot Logical Volumes within a system to determine various operating systems and versions of operating systems located thereon.
2. Description of the Related Art
A hierarchy of structures is used to manage disk storage. Each individual disk drive, called a physical volume (PV) has a name, such as /dev/hdisk0. Every physical volume in use belongs to a volume group (VG). All of the physical volumes in a volume group are divided into physical partitions (PPs) of the same size. For space-allocation purposes, each physical volume is divided into five regions (outer_edge, inner_edge, outer_middle, inner_middle and center). The number of physical partitions in each region varies, depending on the total capacity of the disk drive.
Within each volume group, one or more logical volumes (LVs) are defined. Logical volumes are groups of information located on physical volumes. Data on logical volume appears to be contiguous to the user but can be discontiguous on the physical volume. This allows file systems, paging space, and other logical volumes to be resized or relocated, to span multiple physical volumes, and to have their contents replicated for greater flexibility and availability in the storage of data.
Each logical volume consists of one or more logical partitions (LPs). Each logical partition corresponds to at least one physical partition. If mirroring is specified for the logical volume, additional physical partitions are allocated to store the additional copies of each logical partition. Although the logical partitions are numbered consecutively, the underlying physical partitions are not necessarily consecutive or contiguous.
Logical volumes can serve a number of system purposes, such as paging, but each logical volume serves a single purpose only. Many logical volumes contain a single journaled file system (JFS or JFS2). Each JFS consists of a pool of page-size (4 KB) blocks. When data is to be written to a file, one or more additional blocks are allocated to that file. These blocks might not be contiguous with one another or with other blocks previously allocated to the file. A given file system can be defined as having a fragment size of less than 4 KB (512 bytes, 1 KB, 2 KB).
After installation, the system has one volume group (the rootvg volume group) consisting of a base set of logical volumes required to start the system and any other logical volumes specified to the installation script. Any other physical volumes connected to the system can be added to a volume group. The physical volume is added either to the root volume group or to another volume group. Logical volumes can be tailored using commands, a menu-driven System Management Interface Tool (SMIT) interface, or a Web-based System Manager.
The Advanced Interactive Executive (AIX) operating system, available from International Business Machines, Inc., allows a system manager to create multiple instances of AIX on the same root volume group (rootvg). The multibos setup operation creates a standby Base Operating System (BOS) that boots from a distinct Boot Logical Volume (BLV). Thus, the multibos setup operation creates two bootable instances of the Base Operating Systems on a given root volume group. The system can boot from either instance of the Base Operating Systems by specifying the respective Boot Logical Volume as an argument to the bootlist command, or using system firmware boot operations.
AIX allows an operator to simultaneously maintain two bootable instances of a Base Operating System per root volume group by using the multibos utility. The instance of a Base Operating System associated with the booted Boot Logical Volume is the active Base Operating System. The instance of a Base Operating System associated with the Boot Logical Volume that has not been booted is the standby Base Operating System.
The multibos utility allows the system manager to access, install, maintain, update, and customize the standby Base Operating System either during setup or during any subsequent customization operations. Installing maintenance or technology level updates to the standby Base Operating System does not change system files on the active Base Operating System. This customization of the standby Base Operating allows for concurrent update of the standby Base Operating System, while the active Base Operating System remains in production.
The various Boot Logical Volumes existing on a system can be determined by using the AIX bootlist command of a System Management Service menu. The bootlist command allows the user to display and alter the list of possible boot devices from which the system may be booted. When the system is booted, the system will scan the devices in the list and attempt to boot from the first device it finds containing a boot image. The bootlist command allows the system manager to manage the bootable devices. The normal boot list designates possible boot devices for when the system is booted in normal mode. The service boot list designates possible boot devices for when the system is booted in service mode. The previous boot device entry designates the last device from which the system booted.
Support of these boot lists may vary from platform to platform. A boot list can be displayed or altered only if the platform supports the specified boot list. It may even be the case that a particular hardware platform does not support any of the boot lists.
When searching for a boot device, the system selects the first device in the list and determines if it is bootable. If no boot file system is detected on the first device, the system moves on to the next device in the list. As a result, the ordering of devices in the device list is extremely important. If a mismatch arises between the various Boot Logical Volumes, or worse the system becomes unbootable, a user has no way of discerning the various operating systems residing in a particular Boot Logical Volume from within a System Management Service menu.